/* 容器布局 */
.assistant-container { display: flex; flex-direction: column; height: calc(100vh - 160px); background: #f5f5f5; padding: 16px 0; }
.assistant-container .header,
.assistant-container .message-list,
.assistant-container .input-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
}
.header {
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid #d0d0d0;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}
.title { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #262626; }

.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #fff;
  border-left: 1.5px solid #d0d0d0;
  border-right: 1.5px solid #d0d0d0;
}
.empty-container { display: flex; align-items: center; justify-content: center; height: 100%; }

.input-container {
  padding: 12px 16px;
  background: #fff;
  border: 1.5px solid #d0d0d0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.msg { display: flex; margin-bottom: 16px; animation: fadeIn .2s ease; }
.msg.user { justify-content: flex-end; }
.msg.ai { justify-content: flex-start; }
.msg > div {
  max-width: 72%;
}
.bubble {
  width: 100%;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1.5px solid transparent;
}
.user .bubble {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.5);
}
.ai .bubble {
  background: #fff;
  color: #262626;
  border-color: #d4d4d4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.system-bubble {
  background: #f5f5f5;
  color: #595959;
  border-color: #e5e7eb;
  font-size: 12px;
}
.thinking-bubble {
  font-style: italic;
}
.result-bubble {
  border-color: #1677ff;
  box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.15);
}
.timestamp { font-size: 12px; color: #8c8c8c; margin-top: 4px; }

.code { background: #0d0d0d; color: #f0f0f0; border-radius: 8px; padding: 8px; overflow-x: auto; }
.terminal { background: #111827; color: #e5e7eb; border-radius: 8px; padding: 8px; overflow-x: auto; }

.command-output { margin-top: 8px; }
.command-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: #f5f5f5;
  cursor: pointer;
  user-select: none;
}
.command-output-title { font-size: 13px; color: #595959; }
.command-output-toggle { font-size: 12px; color: #1677ff; }
.command-output-summary {
  margin-top: 4px;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fafafa;
  font-size: 12px;
  color: #8c8c8c;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.command-step {
  margin-top: 12px;
  padding: 12px 12px 10px;
  border-radius: 10px;
  background: #f7f8fa;
  border: 1px solid #e5e7eb;
}
.command-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.command-step-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #262626;
}
.command-step-desc {
  margin-top: 6px;
  font-size: 12px;
  color: #8c8c8c;
}
.command-step-command {
  margin-top: 8px;
  border-radius: 6px;
  background: #111827;
  color: #e5e7eb;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  overflow-x: auto;
}
.command-step-command code {
  white-space: pre;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
